<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>orderItem管理</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../css/style.css">

    <!-- 上传图片框样式，不使用上传组件可以删除此样式 -->
    <style>
        .avatar-uploader .el-upload {
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .avatar-uploader .el-upload:hover {
            border-color: #409EFF;
        }

        .avatar-uploader-icon {
            font-size: 28px;
            color: #8c939d;
            width: 150px;
            height: 70px;
            line-height: 150px;
            text-align: center;
        }

        .avatar {
            width: 150px;
            height: 70px;
            display: block;
        }

    </style>
</head>
<body class="hold-transition">
<div id="app">

    <div class="content-header">
        <h1>管理
            <small>orderItem管理</small>
        </h1>
        <el-breadcrumb separator-class="el-icon-arrow-right" class="breadcrumb">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>管理</el-breadcrumb-item>
            <el-breadcrumb-item>orderItem管理</el-breadcrumb-item>
        </el-breadcrumb>
    </div>

    <div class="app-container">
        <div class="box">

            <div>基本信息</div>
            <table border style="width: 100%" >
                <tr>
                    <td>订单编号</td>
                    <td>发货流水单号</td>
                    <td>用户账号</td>
                    <td>支付方式</td>
                    <td>订单来源</td>
                    <td>发货状态</td>
                    <td>订单状态</td>
                    <td>自动确认收货时间</td>
                </tr>
                <tr>
                    <td>{{tableData.order.id}}</td>
                    <td>{{tableData.order.transactionId}}</td>
                    <td>{{tableData.order.username}}</td>
                    <td>{{tableData.order.payType}}</td>
                    <td>{{tableData.order.sourceType}}</td>
                    <td>{{tableData.order.consignStatus}}</td>
                    <td>{{tableData.order.orderStatus}}</td>
                    <td>15天</td>
                </tr>
            </table>
            <br/>
            <div>收货人信息</div>
            <table border style="width: 100%" >
                <tr>
                    <td>收货人</td>
                    <td>手机号码</td>
                    <td>邮政编码</td>
                    <td>收货地址</td>
                </tr>
                <tr>
                    <td>{{tableData.order.receiverContact}}</td>
                    <td>{{tableData.order.receiverMobile}}</td>
                    <td>没有邮政编码</td>
                    <td>{{tableData.order.receiverAddress}}</td>
                </tr>
            </table>
            <br/>
            <div>商品信息</div>
            <table border style="width: 100%" >
                <tr>
                    <td>商品图片</td>
                    <td>商品名称</td>
                    <td>价格</td>
                    <td>货号</td>
                    <td>数量</td>
                    <td>库存</td>
                    <td>小计</td>
                </tr>
                <tr v-for="(orderItem,index) in tableData.orderItemList">
                    <td>{{orderItem.image}}</td>
                    <td>{{orderItem.name}}</td>
                    <td>{{orderItem.price}}</td>
                    <td>{{orderItem.skuId}}</td>
                    <td>{{orderItem.num}}</td>
                    <td>{{tableData.skuList[index]}}</td>
                    <td>{{orderItem.money}}</td>
                </tr>
            </table>
            <br/>
            <div>费用信息</div>
            <table border style="width: 100%" >
                <tr>
                    <td>商品合计</td>
                    <td>运费</td>
                    <td>活动优惠</td>
                    <td>订单总金额</td>
                    <td>应付款金额</td>
                </tr>
                <tr>
                    <td>{{tableData.order.totalMoney}}</td>
                    <td>{{tableData.order.postFee}}</td>
                    <td>{{tableData.order.preMoney}}</td>
                    <td>{{tableData.order.totalMoney}}</td>
                    <td>{{tableData.order.payMoney}}</td>
                </tr>
            </table>
            <br/>
            <div>操作者信息</div>
            <table border style="width: 100%" >
                <tr>
                    <td>操作者</td>
                    <td>操作时间</td>
                    <td>订单状态</td>
                    <td>付款状态</td>
                    <td>发货状态</td>
                    <td>备注</td>
                </tr>
                <tr>
                </tr>
            </table>
            <br/>
        </div>
    </div>


</div>
</body>
<script src="/js/vue.js"></script>
<script src="/js/axios.js"></script>
<script src="/js/elementui.js"></script>
<script src="/js/util.js"></script>
<script>
    new Vue({
        el: '#app',
        data() {
            return {
                tableData: {}
            }
        },
        created() {
            this.fetchData();
        },
        methods: {
            fetchData() {
                let id = getQueryString("id");
                axios.get(`/order/findOrderAndOrderItems.do?id=${id}`).then(response => {
                    this.tableData = response.data;
                });
            }
        }
    })
</script>
</html>
